home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc Station 14
/
Disc Station Vol 14.BIN
/
drivers
/
canopus
/
3dv95_ut.lzh
/
SETUP.MS_
/
SETUP.MS
Wrap
Text File
|
1996-10-14
|
31KB
|
924 lines
'************************************************
'-- setup.mst --
'Power Window Application Setup script
'Copyright (C) 1996 CANOPUS Co.,Ltd. All rights reserved.
'************************************************
'$INCLUDE 'setupapi.inc'
'$INCLUDE 'msdetect.inc'
'$INCLUDE 'msregdb.inc'
''Dialog ID's
CONST WELCOMEV =200
CONST WELCOMEVUS =201
CONST ASKQUITV =400
CONST ASKQUITVUS =401
CONST OPTIONSV =600
CONST OPTIONSVUS =601
CONST PWBOARD =700
CONST PWBOARDUS =701
CONST DESTPATHW95 =1001
CONST DESTPATHUSW95 =1003
CONST EXITSUCCESSW95 =1101
CONST EXITSUCCESSUSW95=1103
CONST EXITQUIT =1200
CONST EXITQUITUS =1201
CONST EXITFAILURE =1300
CONST EXITFAILUREUS =1301
CONST EXITCHECK =1400
CONST EXITCHECKUS =1401
CONST DESTINSTALL =1500
CONST DESTINSTALLUS =1501
CONST BADPATHW95 =2001
CONST BADPATHUSW95 =2003
CONST POWERERROR =2100
CONST POWERERRORUS =2101
CONST DISKERROR =2200
CONST DISKERRORUS =2201
''Defalut Setting
CONST TRUE =1
CONST FALSE =0
''CustInst list
CONST TOTALKBOX =5
CONST CHECKBOX1 =1
CONST CHECKBOX2 =2
CONST CHECKBOX3 =3
CONST CHECKBOX4 =4
CONST CHECKBOX5 =5
'' Users Area
GLOBAL DEST$ '' Default Dir
GLOBAL WINDRIVE$ '' Windows Dir
GLOBAL GROUP$ '' Group Name
GLOBAL CUIDLL$ '' User DLL File Name
GLOBAL CHECKSTATES$ '' Check Box Data
GLOBAL JPMODE AS INTEGER '' Japanese / English Mode
GLOBAL WINMODE AS INTEGER '' Windows Version
GLOBAL OPBOARD AS INTEGER '' Option Board
GLOBAL MPEGFLG AS INTEGER '' MPEG Board TRUE:HARD MPEG FALSE:SOFT MPEG
GLOBAL VIDEOFLG AS INTEGER '' Video Board TRUE:YES FALSE:NO
GLOBAL VIEWERFLG AS INTEGER '' Video Viewer TRUE:YES FALSE:NO
GLOBAL TUNERFLG AS INTEGER '' TV Tuner TRUE:YES FALSE:NO
GLOBAL MPEGDRV AS INTEGER '' MPEG Driver TRUE:YES FALSE:NO
GLOBAL SPFLG AS INTEGER '' Speed TRUE:YES FALSE:NO
GLOBAL CAPFLG AS INTEGER '' Capture TRUE:YES FALSE:NO
GLOBAL DOCFLG AS INTEGER '' Manual TRUE:YES FALSE:NO
''CustInst list symbol names
DECLARE SUB Install
DECLARE SUB DefaultLoad
DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
DECLARE SUB IniSetAndBakup (szFile$, szSec$, szKey$, szVal$, szSecOp$)
DECLARE SUB IniSetAndBakupChk (szFile$, szSec$, szKey$, szVal$, szSecOp$)
DECLARE SUB IniSetAndStandBakup (szFile$, szSec$, szKey$, szVal$, szSecOp$)
DECLARE SUB UninstallFileCounter (szFile$, szSec$, szKey$, szVal$)
DECLARE FUNCTION CheckPowerWindow LIB "mscuistf.dll" () AS INTEGER
DECLARE FUNCTION GetPowerWindowDir LIB "mscuistf.dll" () AS INTEGER
DECLARE FUNCTION GetWindowsVer LIB "mscuistf.dll" () AS INTEGER
DECLARE FUNCTION ExitWindowsExec LIB "User" (Exec$, Param$) AS INTEGER
DECLARE FUNCTION GetMetrics LIB "mscuistf.dll" () AS INTEGER
' #[ INIT ]
INIT:
CUIDLL$ = "mscuistf.dll"
WINMODE = GetWindowsVer()
JPMODE = GetMetrics()
SetWindowSize 3
SetBitmap CUIDLL$, 1
SetTitle "Power Window Application Setup"
szInf$ = GetSymbolValue("STF_SRCINFPATH")
IF szInf$ = "" THEN
szInf$ = GetSymbolValue("STF_CWDDIR") + "setup.inf"
END IF
ReadInfFile szInf$
IF WINMODE = FALSE THEN
IF JPMODE <> 0 THEN
i% = DoMsgBox("Windows 95 ÉΩùpé╠âAâvâèâPü[âVâçâôé╠é╜é▀üAé▒é╠è┬ï½é╔é═âCâôâXâgü[âïé┼é½é▄é╣é±üB", "Power Window Application Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
ELSE
i% = DoMsgBox("Please install Windows 95 before installing Power Window Application.", "Power Window Application Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
END IF
END
END IF
DefaultLoad
WELCOME:
IF JPMODE <> 0 THEN
dlg% = WELCOMEV
ELSE
dlg% = WELCOMEVUS
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfoDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSE
GOSUB ASKQUITJMP
GOTO WELCOME
END IF
BOARDCHECKSTART:
CHECKSTATES$ = "CheckTool"
RemoveSymbol CHECKSTATES$
RemoveSymbol "OptionsGreyed"
RemoveSymbol "OptionsDelete"
RemoveSymbol "OptionsOutput"
IF OPBOARD = 1 THEN
AddListItem "OptionsOutput", "1"
AddListItem "OptionsDelete", "2"
ELSEIF OPBOARD = 2 THEN
AddListItem "OptionsDelete", "1"
AddListItem "OptionsOutput", "2"
ELSEIF OPBOARD = 3 THEN
AddListItem "OptionsOutput", "1"
AddListItem "OptionsOutput", "2"
END IF
IF VIDEOFLG = FALSE THEN
AddListItem "CheckTool", "OFF"
ELSE
AddListItem "CheckTool", "ON"
END IF
IF MPEGFLG = FALSE THEN
AddListItem "CheckTool", "OFF"
ELSE
AddListItem "CheckTool", "ON"
END IF
BOARDCHECKLOOP:
IF OPBOARD = 0 THEN
GOTO CHECKCUTSTART
END IF
IF JPMODE <> 0 THEN
dlg% = PWBOARD
ELSE
dlg% = PWBOARDUS
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FCheck0DlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
IF GetListItem("CheckTool", 1) = "OFF" THEN
VIDEOFLG=FALSE
ELSE
VIDEOFLG=TRUE
END IF
IF GetListItem("CheckTool", 2) = "OFF" THEN
MPEGFLG=FALSE
ELSE
MPEGFLG=TRUE
END IF
UIPop 1
GOTO CHECKCUTSTART
ELSE
GOSUB ASKQUITJMP
GOTO BOARDCHECKLOOP
END IF
CHECKCUTSTART:
CHECKSTATES$ = "CheckItemsIn"
RemoveSymbol CHECKSTATES$
RemoveSymbol "OptionsGreyed"
RemoveSymbol "OptionsDelete"
RemoveSymbol "OptionsOutput"
IF JPMODE <> 0 THEN
AddListItem CHECKSTATES$, "ON"
ELSE
AddListItem CHECKSTATES$, "OFF"
AddListItem "OptionsGreyed", "1"
END IF
AddListItem CHECKSTATES$, "ON"
IF MPEGFLG = TRUE THEN
AddListItem CHECKSTATES$, "ON"
ELSE
AddListItem CHECKSTATES$, "ON"
END IF
IF VIDEOFLG = TRUE THEN
IF VIEWERFLG = TRUE THEN
AddListItem CHECKSTATES$, "ON"
AddListItem "OptionsOutput", "4"
ELSE
AddListItem CHECKSTATES$, "OFF"
AddListItem "OptionsDelete", "4"
END IF
IF TUNERFLG = TRUE THEN
AddListItem CHECKSTATES$, "ON"
AddListItem "OptionsOutput", "5"
ELSE
AddListItem CHECKSTATES$, "OFF"
AddListItem "OptionsDelete", "5"
END IF
ELSE
AddListItem CHECKSTATES$, "OFF"
AddListItem "OptionsDelete", "4"
AddListItem CHECKSTATES$, "OFF"
AddListItem "OptionsDelete", "5"
END IF
CHECKCUTLOOP:
IF JPMODE <> 0 THEN
dlg% = OPTIONSV
ELSE
dlg% = OPTIONSVUS
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FCheckDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
push% = 0
CHECKSTATES$ = "CheckItemsOut"
FOR i% = 1 TO TOTALKBOX STEP 1
IF GetListItem(CHECKSTATES$, i%) = "ON" THEN
push% = 1
END IF
NEXT i%
IF push% = 0 THEN
IF JPMODE <> 0 THEN
dlg% = EXITCHECK
ELSE
dlg% = EXITCHECKUS
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfoDlgProc", 0, "")
UIPop 1
GOTO CHECKCUTLOOP
END IF
UIPop 1
GOTO GETPATH
ELSEIF sz$ = "BACK" THEN
UIPop 1
IF OPBOARD = 0 THEN
GOTO WELCOME
ELSE
GOTO BOARDCHECKSTART
END IF
ELSE
GOSUB ASKQUITJMP
GOTO CHECKCUTLOOP
END IF
GETPATH:
SetSymbolValue "EditTextIn", DEST$
SetSymbolValue "EditFocus", "END"
GETPATHL1:
IF JPMODE <> 0 THEN
dlg% = DESTPATHW95
ELSE
dlg% = DESTPATHUSW95
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FEditDlgProc", 0, "")
DEST$ = GetSymbolValue("EditTextOut")
IF sz$ = "CONTINUE" THEN
IF IsDirWritable(DEST$) = 0 THEN
GOSUB INPUTPATH
GOTO GETPATHL1
END IF
UIPop 1
ELSEIF sz$ = "REACTIVATE" THEN
GOTO GETPATHL1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO CHECKCUTSTART
ELSE
GOSUB ASKQUITJMP
GOTO GETPATHL1
END IF
INST:
IF JPMODE <> 0 THEN
dlg% = DESTINSTALL
ELSE
dlg% = DESTINSTALLUS
END IF
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfoDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
UIPop 1
ELSEIF sz$ = "BACK" THEN
UIPop 1
GOTO GETPATH
ELSE
GOSUB ASKQUITJMP
GOTO INST
END IF
Install
QUIT:
ON ERROR GOTO ERRQUIT
IF ERR = 0 THEN
IF JPMODE <> 0 THEN
dlg% = EXITSUCCESSW95
ELSE
dlg% = EXITSUCCESSUSW95
END IF
ELSEIF ERR = STFQUIT THEN
IF JPMODE <> 0 THEN
dlg% = EXITQUIT
ELSE
dlg% = EXITQUITUS
END IF
ELSE
IF JPMODE <> 0 THEN
dlg% = EXITFAILURE
ELSE
dlg% = EXITFAILUREUS
END IF
END IF
QUITL1:
sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfoDlgProc", 0, "")
IF sz$ = "CONTINUE" THEN
UIP